package com.jic.market.mapper;

import com.jic.market.orm.BaseMapper;
import com.jic.market.entity.PatchGrouponDetailEntity;
import com.jic.market.orm.Pagination;
import com.jic.market.request.PatchGrouponInstDetailRequest;
import com.jic.market.request.rest.groupon.LaunchGrouponDetailRequest;
import com.jic.market.response.PatchGrouponInstDetailResponse;
import com.jic.market.response.PatchGrouponInstResponse;
import com.jic.market.response.rest.groupon.GroupInfoResponse;
import com.jic.market.response.rest.groupon.LaunchGrouponDetailResponse;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PatchGrouponDetailEntityMapper extends BaseMapper<PatchGrouponDetailEntity>{

    List<PatchGrouponInstDetailResponse> list(@Param("po") PatchGrouponInstDetailRequest request, @Param("page") Pagination pagination);

    int listCount(@Param("po") PatchGrouponInstDetailRequest request);

    Long queryMyGrouponCount(@Param("userId") String userId);

    List<GroupInfoResponse> queryPage(@Param("po") PatchGrouponDetailEntity request, @Param("page") Pagination page);

    Long count(@Param("po") PatchGrouponDetailEntity request);

    /**
     * 查询参团人员
     * @param request
     * @return
     */
    List<PatchGrouponDetailEntity> queryByRefPatchGrouponInst(@Param("po") PatchGrouponDetailEntity request);

    LaunchGrouponDetailResponse queryLaunchGrouponOrderInfo(LaunchGrouponDetailRequest request);

}